
import java.io.PrintWriter;

class SimpleType extends Type {

	private String name_;

	public SimpleType(String string) {
		name_ = string;
	}

	@Override
	public void print(PrintWriter pw) {
		pw.println("Node name : SimpleType");
		pw.println("Type is : " + name_);
	}
	
	public void translate(PrintWriter pw) {
		
	}
	public String translate(PrintWriter pw, String strPare) {
		String strReturn = null;
		if ( name_.equals("Integer") )
		{
			pw.print( strPare + "int" + " " );
			strReturn = "int";
		}
		else if ( name_.equals("String") )
		{
			pw.print( strPare + "String" + " " );
			strReturn = "String";
		}
		else if ( name_.equals("Real") )
		{
			pw.print( strPare + "double" + " " );
			strReturn = "double";
		}
		else if(name_.equals("ArrayList"))
		{
			pw.print(strPare + " ArrayList"+" ");
			strReturn = "ArrayList";
			
		}
		else if(name_.equals("Void"))
		{	
			pw.print("void");
			strReturn = "Void";
		}
		return strReturn;
	}

}
